Component({
    properties: {
        brandList: Object
    },
    data: {
        letter: [],
        brandListId: '',
        hot: [],
        brandlist: [],
        locatebrand: ''
    },
    ready() {
        var brandList = this.properties.brandList.brandList;
        var hot = this.properties.brandList.hot;
        var letter = [];
        brandList.forEach(item => {
            letter.push(item.first_char)
        });
        this.setData({
            letter,
            hot,
            brandlist: brandList,
        })
        // console.log(this.data.brandlist)
    },
    methods: {
        //点击城市
        brandTap(e) {
            this.triggerEvent('brandtap', {
                brand_info: e.currentTarget.dataset.val
            });
        },

        doNone(){},
        //点击城市字母
        letterTap(e) {
            var item = e.currentTarget.dataset.item;
            this.setData({
                brandListId: item
            });
            console.log(this.data.brandListId);
        }
    },
})